<!-- 轮播图 -->
<template>
	<view class="pm100">
		<view class="pr">
			<swiper :current="current" @change="changeswiper" class="dfsgttee" :interval="3000" :duration="1000" circular>
				<swiper-item v-for="(sd,idx) in lunbo" :key="idx">
					<view class="swiper-item w100 h100">
						<image mode="widthFix" class="w100 h100" src="https://duxinggj-2018-1251133427.cos.ap-guangzhou.myqcloud.com/c25f16dc-7dbd-4b62-b83d-b7f5c3cb2cfa.jpg"></image>
					</view>
				</swiper-item>
			</swiper>
			<view class="piimxer">
				<view class="dotjhns cen pm20">
					<text class="diandiane ml20 " @tap="setcurrent(idx)" :class="idx==danqian?'act':''" v-for="(sd,idx) in lunbo" :key="idx"></text>
				</view>
			</view>
		</view>
		<uni-section title="仿网易云音乐轮播图" type="line"></uni-section>
		<view class="pr">
			<swiper previous-margin="100rpx" next-margin="100rpx" @change="changeswiperer" class="dfsgttee" :interval="3000"
			 :duration="1000" circular>
				<swiper-item v-for="(sd,idx) in lunbo" class="kkmmxeert" :key="idx">
					<view class="swiper-item  h100" :class="idx==danqianer?'act':''">
						<image mode="widthFix" class="w100 h100" src="https://duxinggj-2018-1251133427.cos.ap-guangzhou.myqcloud.com/c25f16dc-7dbd-4b62-b83d-b7f5c3cb2cfa.jpg"></image>
					</view>
				</swiper-item>
			</swiper>
		</view>

		<uni-section title="仿酷狗音乐轮播图" type="line"></uni-section>
		<view class="pr">
			<swiper previous-margin="120rpx" next-margin="120rpx" @change="changeswipersan" class="dfsgtteekugou" :interval="3000"
			 :duration="1000" circular>
				<swiper-item v-for="(sd,idx) in lunbo" class="kugouer" :class="idx==danqianesan?'act':''" :key="idx">
					<view class="swiper-item  h100">
						<image mode="widthFix" class="w100 h100" src="https://duxinggj-2018-1251133427.cos.ap-guangzhou.myqcloud.com/c25f16dc-7dbd-4b62-b83d-b7f5c3cb2cfa.jpg"></image>
					</view>
				</swiper-item> 
			</swiper>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				lunbo: 5,
				danqian: 0,
				current: 0,
				danqianer: 0,
				danqianesan: 0
			}
		},
		components: {},
		methods: {
			changeswiper(e) {
				this.danqian = e.detail.current
			},
			changeswiperer(e) {
				this.danqianer = e.detail.current
			},
			changeswipersan(e) {
				this.danqianesan = e.detail.current
			},
			setcurrent(idx) {
				this.current = idx
			}
		},
		mounted() {}
	}
</script>
<style scoped>
	.piimxer {
		position: absolute;
		left: 0;
		bottom: 0;
		width: 100%;
		z-index: 1000;
	}

	.dfsgttee {
		height: 350rpx;
	}

	.diandiane {
		width: 30rpx;
		height: 12rpx;
		background-color: #fff;
		border-radius: 40rpx;
		display: inline-block;
		opacity: 0.5;
	}

	.diandiane.act {
		opacity: 1 !important;
		width: 50rpx;
	}

	.kkmmxeert .swiper-item {
		transform: scale(0.92);
		height: 300rpx !important;
		margin-top: 25rpx;

	}

	.kkmmxeert .swiper-item.act {
		transform: scale(1);
		height: 350rpx !important;
		margin-top: 0;
	}

	.kkmmxeert .swiper-item image {
		border-radius: 20rpx;
	}



	.dfsgtteekugou .kugouer.act {
		border-radius: 20rpx !important;
		margin-top: 0rpx;
		height: 290rpx !important;
	}

	.dfsgtteekugou .kugouer {
		height: 240rpx !important;
		margin-top: 28rpx;
	}
</style>
